import 'dart:async';

import 'package:flutter_stort/model/goods_entity.dart';

class GoodsDao {
  static var goodsImags = [
    "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1608285795593&di=031de57758500aea2444f2ae2fd773b1&imgtype=0&src=http%3A%2F%2Fimage2.suning.cn%2Fb2c%2Fcatentries%2F000000000121054307_1_800x800.jpg",
    "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2979316776,1106496257&fm=26&gp=0.jpg",
    "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1608285795593&di=4db418d09c98b70419d24533c4bee1ed&imgtype=0&src=http%3A%2F%2Fgfs17.gomein.net.cn%2FT1a.xTB4_v1RCvBVdK_800.jpg",
    "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1608285795593&di=2e948520ea3eb48f037ab2d3f32947f9&imgtype=0&src=http%3A%2F%2Fbpic.588ku.com%2Felement_origin_min_pic%2F16%2F07%2F06%2F05577c2ce29f9ff.jpg",
    "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1608285795593&di=de54b47573044f3fb9eea6522997162a&imgtype=0&src=http%3A%2F%2Fgfs17.gomein.net.cn%2FT1b.DTBKJv1RCvBVdK_800.jpg",
  ];

  static Future<List<GoodsEntity>> getGoods() async {
    List<GoodsEntity> listData = List<GoodsEntity>();
    for (var i = 0; i < 1; i++) {
      listData.add(
        GoodsEntity(
          title: "小米洗烘一体机",
          id: "${i + 1}",
          url:
              "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2699161186,1318363053&fm=26&gp=0.jpg",
          createTime: "2019-10-10 00:00",
          content: "智能烘干，高效净衣，省水省电智能烘干，高效净衣，省水省电",
          price: 1999.00,
          stock: 200,
          freight: "免费",
        ),
      );
    }
    return listData;
  }

  static Future<List<String>> getGoodsImg() async {
    return goodsImags;
  }
}
